/*
 * Copyright 2018 Shanxi Lu'an Taihang Laihui Net Tech co.,LTD.
 */
package src.com.bjsxt.height.design014_test;

/**
 * Description:
 *
 * @author wzz
 * @since: 1.0
 * Create Date Time: 2018/10/30 17:42
 * Update Date Time:
 */
public class FutureClient {

    public Data request(final String str){
        //代理对象先返回给发送请求的客户端,告诉他请求已收到,可以做其他的事情
        FutureData futureData = new FutureData();
        new Thread(new Runnable() {
            @Override
            public void run() {
                RealData realData = new RealData(str);
                futureData.setRealData(realData);
            }
        }).start();
        return futureData;
    }
}
